#ifndef _DUMPER_H_
#define _DUMPER_H_
#include "..\Master.h"
#include "..\GParser.h"

class CDumper
{
private:
	CMaster * Master;
	CTimer * Timer;
	CGParser * Parser;
	CRITICAL_SECTION CSPrintState;
	DWORD CNT, No, Exe, Sch;
	DWORD * QDst, * QSrc;
	QWORD Queue[QUEUE_SIZE];
	struct TSP
	{
		DWORD Time;
		DWORD * QSrc;
		bool A, D;
		CCommand Cmd;
		DWORD * TimerDst, * TimerSrc, * TimerPos;
		DWORD Exe;
	} Spins[3];
public:
	CDumper(CMaster * Master, CTimer * Timer, CGParser * Parser);
	void PrintState(int Src, const char * Text, char L = 'R', DWORD * q = 0);
	~CDumper(void) { DeleteCriticalSection(&CSPrintState);};
};

#endif